#include "sort.hpp"

void Test1(){
  int arri[] = {1,5,3,6,3,8,2,9};
  vector<int> vc(arri, arri+8); 
  for(auto e:vc)
  {
    cout << e << " ";
  }
  cout << endl;

  //insert_sort(vc,Less<int>());
  //shell_sort(vc,Less<int>());
  //select_sort(vc);
  //heap_sort(vc,Less<int>());
  bubble_sort(vc,Less<int>());
  for(auto e:vc)
  {
    cout << e << " ";
  }
  cout << endl;
}

void Test2(){
  char arrc[] = "acvdsxzf";
  vector<char> vc(arrc, arrc+8); 
  for(auto e:vc)
  {
    cout << e << " ";
  }
  cout << endl;

  //insert_sort(vc,Less<char>());
  //shell_sort(vc,Less<char>());
  //select_sort(vc);
  //heap_sort(vc,Less<char>());
  bubble_sort(vc,Less<char>());
  for(auto e:vc)
  {
    cout << e << " ";
  }
  cout << endl;
}

void Test3(){
  double arrd[] = {1.3,2.4,5.5,1.2,4.6,7.6,3.14,5.26};
  vector<double> vc(arrd, arrd+8); 
  for(auto e:vc)
  {
    cout << e << " ";
  }
  cout << endl;

  //insert_sort(vc,Less<double>());
  //shell_sort(vc,Less<double>());
  //select_sort(vc);
  //heap_sort(vc,Greater<double>());
  bubble_sort(vc,Greater<double>());
  for(auto e:vc)
  {
    cout << e << " ";
  }
  cout << endl;
}

void Test4(){
  int arr[] = {1,4,3,5,6,7,2,8,1,2};
  heap<int, vector<int>, Greater<int>> hp(arr, arr+10);
  while(!hp.empty()){
    cout << hp.top() << " ";
    hp.pop();
  }
  cout << endl;
}

int main(){
  Test1();
  Test2();
  Test3();
  //Test4();
  return 0;
}
